package me.like.diandian.api;

import java.util.List;

import me.like.diandian.base.BaseModel;
import me.like.diandian.base.BasePageBean;
import me.like.diandian.bean.AppVersionInfo;
import me.like.diandian.bean.BannerAnnounce;
import me.like.diandian.bean.BannerListBean;
import me.like.diandian.bean.LoanMarketListBean;
import me.like.diandian.bean.StartImgBean;
import me.like.diandian.bean.UserLoginBean;
import me.like.diandian.requestbean.BannerRequest;
import me.like.diandian.requestbean.FrontAppVersionRequest;
import me.like.diandian.requestbean.HoweLoanMarketCountDto;
import me.like.diandian.requestbean.LoginRequest;
import retrofit2.http.Body;
import retrofit2.http.POST;
import retrofit2.http.Query;
import rx.Observable;

/**
 * Created by Administrator on 2017/1/16.
 */

public interface ApiService {



    @POST(ApiUrl.getBannerList)
    Observable<BaseModel<List<BannerListBean>>> getBannerList(@Body BannerRequest BannerDto);

    //验证码登陆
    @POST(ApiUrl.messageLoginSubmit)
    Observable<BaseModel<UserLoginBean>> messageLoginSubmit(@Body LoginRequest loginRequest);

    //获取验证码
    @POST(ApiUrl.sendPhone)
    Observable<BaseModel<String>> sendPhone(@Query("phone") String phone, @Query("sendType") String sendType);

    //启动页
    @POST(ApiUrl.getStartImg)
    Observable<BaseModel<StartImgBean>> getStartImg();

    //前台获取贷超列表
    @POST(ApiUrl.getLoanMarketList)
    Observable<BaseModel<List<LoanMarketListBean>>> getLoanMarketList(@Query("showLocaltion") String showLocaltion, @Query("appChannelId") String appChannelId,
                                                                      @Query("loanType") String loanType, @Query("limitType") String limitType,
                                                                      @Query("generalOrder") String generalOrder);


    @POST(ApiUrl.bannerAnnounce)
    Observable<BaseModel<BasePageBean<List<BannerAnnounce>>>> bannerAnnounce(@Query("isAll") String isAll, @Query("limit") String limit,
                                                                             @Query("start") String start);

    @POST(ApiUrl.queryAppVersionInfo)
    Observable<BaseModel<AppVersionInfo>> queryAppVersionInfo(@Body FrontAppVersionRequest request);

    @POST(ApiUrl.countLoanMarketAppRegist)
    Observable<BaseModel<String>> countLoanMarketAppRegist(@Body HoweLoanMarketCountDto BannerDto);




}
